#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void bubble_sort(int* arr,int sz)
{
	int i = 0;
	for (i = 0; i < sz - 1; i++)
	{
		int j = 0;
		int ischange = 0;
		for (j = 1; j < sz - i; j++)
		{
			int tmp = 0;
			if (arr[j - 1] > arr[j])
			{
				tmp = arr[j - 1];
				arr[j - 1] = arr[j];
				arr[j] = tmp;
				ischange = 1;
			}
		}
		if (!ischange)
			return;
	}
}
int main()
{
	int arr[] = { 1,234,4,22222,1,515,15,15,16,1,16,1,61,6126,16,161,61,61,1 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	bubble_sort(arr,sz);
	int i = 0;

	for (i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}
}